package org.newcih.controller;

import org.newcih.domain.Order;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("mapping")
public class Test {

    @GetMapping("user")
    @ResponseBody
    public Order getOrder() {
        Order order = new Order();
        order.setOrderNumber(23232);
        order.setId("fhefuie");
        return order;
    }

    @PostMapping(value = "user")
    @ResponseBody
    public Order postOrder(@RequestBody Order order) {
        return order;
    }
}
